Greetings folks,
DB test
DBE lstTest
string arr [] = {}
/************ Populate List Element ************/
void populateList (DBE Elem)
{
Module m = current
Object o
int i = 0
string j
for o in m do
{
j = o."Absolute Number"
insert(lstTest, i, j)
i++
}
}
/************ List Action ************/
void sModGoTo (DBE Elem)
{
int lstData
int gtNum
Module m = current
string srcName = fullName(m)
sMod = edit(srcName, true)
sMod = current
for(lstData=0;lstData<noElems(lstTest);lstData++)
{
if(selected(lstTest, lstData))
{
gtNum = get(lstTest) /***I need this to be the value of the selection not the position***/
}
}
gotoObject(gtNum, sMod) /***I want the program to go to the object based on the selection***/
}
/************ GUI ************/
test = create("List Box", styleCentered)
lstTest = list(test, "Select Object ID", 5, arr)
realize(test)
populateList(lstTest)
set(lstTest, sModGoTo)
show(test)
SystemAdmin - Fri Sep 11 14:56:23 EDT 2009 |
Re: How to get a List Element Value as a Integer?
Try:
DB test
DBE lstTest
string arr [] = {}
/************ Populate List Element ************/
void populateList (DBE Elem)
{
Module m = current
Object o
int i = 0
string j
for o in m do
{
j = o."Absolute Number"
insert(lstTest, i, j)
i++
}
}
/************ List Action ************/
void sModGoTo (DBE Elem)
{ string s
int lstData
int gtNum
Module m = current
string srcName = fullName(m)
sMod = edit(srcName, true)
sMod = current
for(lstData=0;lstData<noElems(lstTest);lstData++)
{
if(selected(lstTest, lstData))
s =get(lstTest) /***I need this to be the value of the selection not the position***/
}
gtNum = intOf s
gotoObject(gtNum, sMod) /***I want the program to go to the object based on the selection***/
}
/************ GUI ************/
test = create("List Box", styleCentered)
lstTest = list(test, "Select Object ID", 5, arr)
realize(test)
populateList(lstTest)
set(lstTest, sModGoTo)
show test
|
Re: How to get a List Element Value as a Integer? Ron_Lewis - Fri Sep 11 15:52:30 EDT 2009
Try:
DB test
DBE lstTest
string arr [] = {}
/************ Populate List Element ************/
void populateList (DBE Elem)
{
Module m = current
Object o
int i = 0
string j
for o in m do
{
j = o."Absolute Number"
insert(lstTest, i, j)
i++
}
}
/************ List Action ************/
void sModGoTo (DBE Elem)
{ string s
int lstData
int gtNum
Module m = current
string srcName = fullName(m)
sMod = edit(srcName, true)
sMod = current
for(lstData=0;lstData<noElems(lstTest);lstData++)
{
if(selected(lstTest, lstData))
s =get(lstTest) /***I need this to be the value of the selection not the position***/
}
gtNum = intOf s
gotoObject(gtNum, sMod) /***I want the program to go to the object based on the selection***/
}
/************ GUI ************/
test = create("List Box", styleCentered)
lstTest = list(test, "Select Object ID", 5, arr)
realize(test)
populateList(lstTest)
set(lstTest, sModGoTo)
show test
|
Re: How to get a List Element Value as a Integer? Ron_Lewis - Fri Sep 11 15:52:30 EDT 2009
Try:
DB test
DBE lstTest
string arr [] = {}
/************ Populate List Element ************/
void populateList (DBE Elem)
{
Module m = current
Object o
int i = 0
string j
for o in m do
{
j = o."Absolute Number"
insert(lstTest, i, j)
i++
}
}
/************ List Action ************/
void sModGoTo (DBE Elem)
{ string s
int lstData
int gtNum
Module m = current
string srcName = fullName(m)
sMod = edit(srcName, true)
sMod = current
for(lstData=0;lstData<noElems(lstTest);lstData++)
{
if(selected(lstTest, lstData))
s =get(lstTest) /***I need this to be the value of the selection not the position***/
}
gtNum = intOf s
gotoObject(gtNum, sMod) /***I want the program to go to the object based on the selection***/
}
/************ GUI ************/
test = create("List Box", styleCentered)
lstTest = list(test, "Select Object ID", 5, arr)
realize(test)
populateList(lstTest)
set(lstTest, sModGoTo)
show test
Doesn't the 'insert' require an input string? insert(1stTest, i, j "")
|
Re: How to get a List Element Value as a Integer? llandale - Mon Sep 14 17:52:59 EDT 2009
|